package com.uqbar.asteroids.components;


public class BigAsteroid extends Asteroid{
	
	public BigAsteroid(double width, double height){
		super(60,25,width,height);
		this.definirPosicion(width, height);
		this.setPuntos(5);
		this.activar();
	}
	
	protected void hasHit(){
		MediumAsteriod MA;
		for(int i = 0 ; i<2; i++){
			if(this.getScene().getAsteroidesMedianos().isEmpty()){
				MA =new MediumAsteriod(this.getX(), this.getY(),this.width, this.heigth);
				MA.activar();
				this.getScene().addComponent(MA);
				this.getScene().addAsteroidActivo(MA);
			}else{
				MA = this.getScene().getMediumAsteriod();
				this.pasarDatosA(MA);
				MA.activar();
				this.getScene().addAsteroidActivo(MA);
			}
		}

		this.getScene().getAsteroidesActivos().remove(this);

		this.getScene().addBigAsteroid(this);
		this.toOutScreen();
	}

	
	
}
